package com.mdb.open.trade.resource;

import com.mdb.bc.api.data.ListResultEx;
import com.mdb.bc.logger.LogAnnotation;
import com.mdb.bc.web.support.SuperResources;
import com.mdb.open.trade.domain.vo.product.DictVo;
import com.mdb.open.trade.service.product.DictService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

/**
 * 类描述：
 *  业务参数字典表 前端控制器
 *
 * @author liuyi
 * @date 2019-07-08
 */
@RestController
@RequestMapping("dict")
@Api(tags = "字典管理")
@ApiIgnore
public class DictResource extends SuperResources {

    @Autowired
    DictService dictService;

    @LogAnnotation
    @ApiOperation("根据字典CODE获取字典项")
    @GetMapping("/list/{code}")
    public ListResultEx<DictVo> queryByDictCode(@PathVariable("code") String code) {
//        List<Dict> dictList = dictService.listByCode(code);
//        return convertListResult(dictList, DictVo.class);
        return ListResultEx.ok();
    }

}
